<template>
  <div class="model-wrap">
    <button class="btn btn-sm btn-primary" @click="showModal = true">新增存股宝</button>
      <modal
        title="新增存股宝"
        ok-text="提交"
        cancel-text="取消"
        effect="fade"
        :small="true"
        :width="460"
        :show.sync="showModal"
        :callback="submit">
        <div slot="modal-body" class="modal-body">
          <form class="form-horizontal" role="form" v-el:form>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*代号</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.name">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*股票代码</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.code">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*股票类型</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="cgb.category">
                  <option value="2">A股股票</option>
                  <option value="3">A股债券</option>
                  <option value="4">A股可转债</option>
                  <option value="5">A股基金</option>
                  <option value="20">港股</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*起购金额</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.leastMoney" placeholder="88600元起购">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*起购金额<br>(财富号)</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.investmentAmount" placeholder="1000HKD">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*收益</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.increase" placeholder="近10年涨$1600%$">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*豆腐块图片</label>
              <div class="col-sm-9 text-left">
                <input type="file" class="form-control" v-el:blockPicFile accept="image/jpeg,image/png">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*详情图片</label>
              <div class="col-sm-9 text-left">
                <input type="file" class="form-control" v-el:picFile accept="image/jpeg,image/png">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*股票Logo</label>
              <div class="col-sm-9 text-left">
                <input type="file" class="form-control" v-el:logoPicFile accept="image/jpeg,image/png">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*详情链接</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.location">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*分享标题</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.shareTitle">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*分享内容</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.shareContent">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*分享图片</label>
              <div class="col-sm-9 text-left">
                <input type="file" class="form-control" v-el:sharePicFile accept="image/jpeg,image/png">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*凭证默认标语</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.thoughts">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*文章栏目ID</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="cgb.articleTopicId">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">*首页展示</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="cgb.homeShow">
                  <option value="0">不显示</option>
                  <option value="1">显示</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">描述</label>
              <div class="col-sm-9 text-left">
                <textarea class="form-control" rows="3" v-model="cgb.description"></textarea>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">发布时间</label>
              <div class="col-sm-9 text-left">
                <vue-datepicker
                    :time.sync="cgb.publishTime"
                    :option="datePickerOption"
                  ></vue-datepicker>
              </div>
            </div>
          </form>
        </div>
      </modal>
  </div>
</template>
<script src="./cgb-new.js"></script>